const Sequelize = require('sequelize');
module.exports = function (sequelize) {
  return sequelize.define(
    "notice",  // 表名
    {
      noticeTheme: {  // 公告主题
        type: Sequelize.STRING(20),
        allowNull: false,
      },
      noticeTitle: {  // 标题
        type: Sequelize.STRING(20),
        allowNull: false,
      },
      noticeContent: {  // 发布内容
        type: Sequelize.TEXT(0),
        allowNull: false,
      },
      isStick: {  // 是否置顶，默认置顶
        type: Sequelize.BOOLEAN,
        allowNull: false,
        default:true
      }
    }
  )
};